<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>票品信息管理</title>
<%@include file="../../header.jsp" %>
<!-- my97datepicker -->
<script type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script>

<!-- jquery fileupload -->
<script type="text/javascript" src="/js/vendor/jquery.ui.widget.js"></script>  
<script type="text/javascript" src="/js/jquery.iframe-transport.js"></script>  
<script type="text/javascript" src="/js/jquery.fileupload.js"></script>
<link rel="stylesheet" href="/css/jquery.fileupload.css">
<script type="text/javascript">
	function changeStatus(id, isok) {
		var oper = isok==1?"下架":"上架";
		if(window.confirm("确认"+oper+"?")) {
			$.ajax({
				url:"/ticket/ad/changeStatus.htm",
				data:"id="+id+"&isok="+isok,
				dataType:"json",
			}).done(function(data){
				alert(data.msg);
				if(data.isSuccess)
					window.location = window.location;
			})
		}
	}
	
	function addAd() {
		var dictId = $("#dictId").val();
		if(dictId==null||dictId=="") {
			alert("请选择广告类别！！");
			return;
		}
		window.location = "/ticket/ad/addView.htm?dictionaryId="+dictId+"&type=${param.type}";
	}
</script>
</head>
<body>
    <div class="ch-container">
	<div class="row">
		<div class="box col-md-12">
	       	<div class="box-inner">
	           <div class="box-header well" data-original-title="">
	               <h2><i class="glyphicon glyphicon-edit"></i> 查询条件</h2>
	
	               <div class="box-icon">
	                   <a href="javascript:;" class="btn btn-setting btn-round btn-default"><i
	                           class="glyphicon glyphicon-cog"></i></a>
	                   <a href="javascript:;" class="btn btn-minimize btn-round btn-default"><i
	                           class="glyphicon glyphicon-chevron-up"></i></a>
	                   <a href="javascript:;" class="btn btn-close btn-round btn-default"><i
	                           class="glyphicon glyphicon-remove"></i></a>
	               </div>
	           </div>
	           <div class="box-content">
	               <form class="form-inline" id="onsale-ticket-query-form">
	                   <div class="form-group col-md-5">
	                       <label>${typeStr }：</label>
	                       <select id="dictId" class="form-control">
	                       		<option value="">--请选择--</option>
	                       		<c:forEach items="${dicts }" var="dict">
	                       			<option value="${dict.dictionaryId }"
	                       			
	                       			<c:if test="${param.dictionaryId eq dict.dictionaryId }">selected="selected"</c:if>
	                       			
	                       			>${dict.name }</option>
	                       		</c:forEach>
	                       </select>
	                   </div>
	                   <div class="clearfix"></div><br>
	               </form>
	           </div>
	       </div>
	   </div>
	</div>
	<div class="row">
		<div class="box col-md-12">
   			<div class="box-inner">
   				<div class="box-header well" data-original-title="">
       				<h2><i class="glyphicon glyphicon-user"></i> 票品上下架列表</h2>

       				<div class="box-icon">
			            <a href="#" class="btn btn-setting btn-round btn-default"><i class="glyphicon glyphicon-cog"></i></a>
			            <a href="#" class="btn btn-minimize btn-round btn-default"><i
			                    class="glyphicon glyphicon-chevron-up"></i></a>
			            <a href="#" class="btn btn-close btn-round btn-default"><i class="glyphicon glyphicon-remove"></i></a>
			        </div>
   				</div>
   				<div class="box-content" id="onsale-ticket-table">
   					<jsp:include page="table.jsp"/>
			    	<a href="javascript:;" onclick="addAd();" class="btn btn-default">新增广告</a>
			    	<!-- <a href="#" class="btn btn-default" onclick="remove();">删除</a> -->
			    </div>
   			</div>
   		</div>
	</div>
    
</body>
</html>